package com.kapo.egroup.entity.base.project;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.kapo.egroup.entity.base.BaseEntity;
import com.kapo.egroup.entity.base.user.User;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;

import java.util.Date;

/**
 * @Title Project
 * @Description TODO
 * @Author 86159
 * @Date 2023-03-31 17:08
 **/
@Getter
@Setter
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Project extends BaseEntity {

    /*
     * 负责人id
     */
    private Long leaderId;

    /*
     * 负责人用户
     */
    @TableField(exist = false)
    private User leader;

    /*
     * 课题名称
     */
    private String projectName;

    /*
     * 课题简介
     */
    private String description;

    /*
     * 课题要求
     */
    private String requirement;

    /*
     * 课题类型
     */
    private Integer type;

    /*
     * 课程任务id（可选）
     */
    private Long lessonTaskId;

    /*
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startTime;

    /*
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endTime;

    @Override
    public String toString() {
        return "Project{" +
                "id=" + getId() +
                ", name='" + projectName + '\'' +
                ", description=" + description +
                '}';
    }
}
